Repository navigation
Studio map: the C/C++ extractor, c-includes (#806) - #814
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CVqACcz69cZfFntnejeG9g
…e folder tie-break (#808) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CVqACcz69cZfFntnejeG9g
…806) Worker: opencode/deepseek-v4.1-flash-free
The lexer reads a digit separator inside a number (`1'000`) as part of the number, not as a character literal, and a block comment after code no longer puts the next code at a line's start. map.md cites ADR 0004 by its file name, restores "(ignored or not)" in the evidence rule and matches the sibling sections' Under-/Over-counts form. c.rs folds its single-case tests into the tables, adds the ignored-sibling row, and uses the shared Unsure helper. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CVqACcz69cZfFntnejeG9g
A backslash right before a line's end no longer carries a string or character literal onto the next line. The lexer table gains a row where a string hides a comment opener, and the scan test checks each C++ extension alone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CVqACcz69cZfFntnejeG9g
danielrispler
marked this pull request as ready for review
November 28, 2026 16:07
This was referenced Nov 28, 2026
Studio map: c-includes, path-ending match, system names, Unsure and the folder tie-break (#806)
#808
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A new extractor,
c-includes, reads every tracked C and C++ file (13 extensions, any case) as text and turns each#includeinto a pair. It reads no build file and runs no compiler (ADR 0002).The free scan's language table gains
cxx c++ hh hxx h++ inl ipp tccas C++, so First map's language line says "C and C++: links computed".map.mdgets thec-includessection with its under- and over-counts.system-map.jsonneeds no change:map-engine's "Extractors and links" already ownssystem-map/src/extract/.Evidence
After:
system-map/tests/c.rs(behaviour tests, table-shaped), the contract cases onc-includes, and a new row inscan.rs's language test.npm run checkpasses at 680f0bd.Trials (#810), at the research's commits, with the research's vendored trees ignored. Evidence is in
local-evidence/2026-11-28-c-includes-trials/.c-includesunique file pairsimports --jsonwall(file, name)sets are identical to the research script's on all four repositories.lib/vtls/rustls.cand redis'ssrc/zmalloc.ceach name one header twice.<rustls.h>→lib/vtls/rustls.hand the VMScurlmsg_vms.h. Both are documented over-counts.checktakes 0.39-0.49 s, well under a second (the research's Python prototype took 1.4 s).imports --jsonand per-filecheck --jsonoutput.Tests merged into tables (each passed before and after; every input survives as a row):
a_sibling_wins_over_a_root_relative_match_elsewherecandidates_are_files_whose_path_ends_with_the_include_after_a_slashan_angle_bracket_include_skips_the_including_files_foldera_tie_between_a_production_header_and_a_test_one_is_the_production_onean_empty_absolute_or_backslashed_path_gives_nothinga_quoted_include_pairs_with_a_file_next_to_the_including_fileincludes_inside_an_ignored_file_give_nothingan_ignored_or_skipped_file_gives_no_pair_and_an_adjacent_one_stops_the_search(renamed froman_adjacent_file_the_map_ignores_or_the_reader_skips_gives_no_pair_and_stops_the_search)All of these were added in this PR. None is tagged
@law.Final review (standards, spec, correctness at
/code-review high). No high or medium defects were found. Fixed in cfeb914:map.mdwas wrong.map.mddropped "(ignored or not)" from the evidence rule.common::assert_only_candidate_links_relaxed.1'000) opened a fake char literal that hid a later/*orR"(.#a directive.Both lexer cases were reproduced against
clang -E.Left as they are:
/* c */ #includepairs, as the preprocessor reads it.Outside review
gemini-4-neon-medium.
cost: 4.9 min, 277723 tokens; Gemini quota left: weekly 46% to 45%, 5h 97% to 92%skip_quotedstepped a backslash over the line's end, so#error don't \\+ newline swallowed the next line's#include. It was red first. The correctness pass had not reported it.#at a line's start. Addedconst char *s = "/*";before an include. The correctness pass had not reported it.Route outcomes
npm run checkon the merged tree, and it passed.Merge Danger
Door: two-way
A new extractor, used only by maps that name
c-includes, plus 8 scan table rows. Reverting removes both. No stored type changes.Blast Radius: small
plotkeeper's own
checkandimportsprint the same output, since it tracks no C or C++ file. A map that namesc-includeson a C repository gains links, and some may now fail. That is the point of the change. The scan's C/C++ language line changes from no reader to "links computed".Closes #806
Closes #807
Closes #808
Closes #809
Closes #810
🤖 Generated with Claude Code
https://claude.ai/code/session_01CVqACcz69cZfFntnejeG9g